import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from "path";
import autoprefixer from "autoprefixer";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "src"),
      "@go": path.resolve(__dirname, "wailsjs", "go"),
      "@runtime": path.resolve(__dirname, "wailsjs", "runtime", "runtime.js"),
    },
    // extensions: [".js", ".ts", ".jsx", ".tsx", ".json"],
  },
  build: {
    target: "ESNext",
  },
  css: {
    preprocessorOptions: {
      less: {
        javascriptEnabled: true,
        modifyVars: {},
      },
    },
    postcss: {
      plugins: [autoprefixer()],
    },
    modules: {
      localsConvention: "camelCase",
    },
  },
})
